﻿using System;
using System.Web.Configuration;
using DG.Tweening;
using Gp.Scripts.Core;
using HighlightPlus;
using UnityEngine;

namespace Helpers
{
    public static class EntityVxHelper
    {
        public static Tweener TriggerHitHighlightEffect(UnitModel model)
        {
            
            return null;
        }


        public static void TriggerHighlightEffect(this BaseEntity entity)
        {
            if (entity is not BaseUnit unit) return;
            unit.Model.OutlineRenderer.TriggerHighlight();
        }


        public static void DisableHighlightEffect(this BaseEntity entity)
        {
            if (entity is not BaseUnit unit) return;
            unit.Model.OutlineRenderer?.DisableHighlight();
        }


        public static void SetOutlineMode(this BaseEntity entity, UnitOutlineMode outlineMode)
        {
            if (entity is not BaseUnit unit) return;
            unit.Model.OutlineRenderer.SetOutlineMode(outlineMode);
        }
    }
}